package org.traffometer.traffobase.control.command;

import org.traffometer.traffobase.control.Page;
import javax.servlet.http.HttpServletRequest;

/**
 * An interface to support the Command pattern for action dispatching in the
 * MVC framework for JSP page serving. All command instances should
 * take a request and response object, extract any additional parameters necessary,
 * do processing and store the results in the request object, then return the Page
 * instance that should be dispatched to for displaying the results.
 *
 * @author Philip M. Johnson
 * @author Jitender Miglani (did minor changes)
 */
public interface Command {
  /**
   * Processes a request from the user.
   *
   * @param request The request object, from which additional data concerning the user request
   * can be extracted.
   * @return The page that should be dispatched to next.
   */
  public Page process(HttpServletRequest request);
}

